package com.parking.mgr.useraccount.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.parking.mgr.useraccount.model.entity.UserPhoneEntity;
import com.parking.mgr.useraccount.model.param.UserPhoneOtherParam;
import com.parking.mgr.useraccount.model.param.UserPhoneParam;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName UserPhoneService
 * @Description 用户手机号service
 * @Auther: zhijianpu
 * @Date: 2023/5/25
 */
public interface UserPhoneService extends IService<UserPhoneEntity> {

    /**
     * 增加用户手机号
     *
     * @param userPhoneParam
     */
    void addSelfUserPhone(UserPhoneParam userPhoneParam, HttpServletRequest request);

    /**
     * 添加非登录用户手机号
     *
     * @param userPhoneOtherParam
     * @param request
     */
    void addOtherUserPhone(UserPhoneOtherParam userPhoneOtherParam, HttpServletRequest request);

    /**
     * 根据用户账号删除手机号
     *
     * @param passportId
     */
    void deleteUserPhoneByPassportId(String passportId);

    /**
     * 修改登录用户手机号
     *
     * @param userPhoneParam
     * @param request
     */
    void editUserPhone(UserPhoneParam userPhoneParam, HttpServletRequest request);

    /**
     * 修改非登录用户手机号
     *
     * @param userPhoneOtherParam
     * @param request
     */
    void editOtherUserPhone(UserPhoneOtherParam userPhoneOtherParam, HttpServletRequest request);

    void saveUserPhone(String passportId, String phoneCode, String phoneNumber);

    UserPhoneEntity getUserInfoByPhone(String phoneNumber);
}
